/**
 * Copyright (C), 2020-2021 by colley.ma
 * File Name: LoggerAlarmEvent.java
 * Encoding: UTF-8
 * Date: 2021年12月28日 上午11:20:25
 * History:
 */
package com.swak.frame.ump;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component
@Lazy
public class LoggerAlarmEvent implements AlarmEvent {
    private Logger logger = LoggerFactory.getLogger(getClass()); // 日志记录

    @Override
    public void event(EventInfo event) {
        // logger日志
        logger.warn("[swak-event] - " + event.getInfo(), event.getArgs());
    }

    @Override
    public int getOrder() {
        return 1;
    }
}
